<?php
include "otamu_config.php";

define("_MENUVIEWPATH_","views/menu/");

if (!isset($_REQUEST['act'])) $_REQUEST['act'] = '';
//$role = $_REQUEST['role'];

//print_r($_SESSION);

$menu_act = $_REQUEST['act'];

if(!$ENABLE_LOGIN) $_SESSION['current_role'] = 'admin';

if ( ($_SESSION['current_role'] == '') && ($_REQUEST['act']!='change_role') ) $menu_act = 'select_role';

switch ($menu_act) {

	case "show":
		break;

	case "select_role":
		$_SESSION['current_role'] = '';
		//header ("Location: index.php");
		break;

	case "change_role":
		//session_unregister(current_role);
		//session_register(current_role);
		$_SESSION['current_role'] = $_REQUEST['the_role'];
		header ("Location: index.php");
		//exit;
		break;


	default :
		$menu_act = "show";
		break;
}

include _MENUVIEWPATH_."menu_layout.php";

?>
